﻿using System;
using System.Linq.Expressions;

namespace IDI.Studio.Core
{
    public interface ISpecification<T>
    {
        bool IsSatisfiedBy(T entity);

        ISpecification<T> And(ISpecification<T> other);

        ISpecification<T> Or(ISpecification<T> other);

        ISpecification<T> Not();

        Expression<Func<T, bool>> GetExpression();
    }
}
